function [x_Jy_NonStanceFootX] = Jy_NonStanceFootX(x)
x_Jy_NonStanceFootX=[1.,0.,(-1.).*sin(x(3)).*((-0.1524).*(1. + (-1.).*cos(x(4))) +  ...
  0.0508.*sin(x(4))) + (-1.).*cos(x(3)).*(0.0508.*(1. + (-1.).*cos( ...
  x(4))) + 0.1524.*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*(0.4572.*(1. + (-1.).*cos(x(5))) + 0.1524.*sin( ...
  x(5))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4) ...
  )).*((-0.1524).*(1. + (-1.).*cos(x(5))) + 0.4572.*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*(0.8636.*(1. + (-1.).*cos(x(6))) + 0.1524.*sin(x(6)) ...
  ) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*((-0.1524).*(1. + (-1.).*cos(x(6))) + 0.8636.*sin(x( ...
  6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*(( ...
  -0.1524).*(1. + (-1.).*cos(x(7))) + (-0.8636).*sin(x(7))) + (cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin( ...
  x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*(0.8636.*( ...
  1. + (-1.).*cos(x(7))) + (-0.1524).*sin(x(7))) + (cos(x(7)).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4)) ...
  ).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x( ...
  3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
   + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) ...
   + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*(( ...
  -0.1524).*(1. + (-1.).*cos(x(8))) + (-0.4572).*sin(x(8))) + (cos( ...
  x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ...
   (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4))  ...
  + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*( ...
  0.4572.*(1. + (-1.).*cos(x(8))) + (-0.1524).*sin(x(8))) + (cos(x( ...
  8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x( ...
  4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x( ...
  6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin( ...
  x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x( ...
  4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x( ...
  6))).*sin(x(7))).*sin(x(8))).*(0.0508.*(1. + (-1.).*cos(x(9))) + ( ...
  -0.1524).*sin(x(9))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
   + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3) ...
  ).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) ...
  .*((-0.1524).*(1. + (-1.).*cos(x(9))) + (-0.0508).*sin(x(9))) +  ...
  0.0508.*(cos(x(9)).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos( ...
  x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + ( ...
  -1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8)))  ...
  + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).* ...
  sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))) + ( ...
  -0.1524).*(cos(x(9)).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
   + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3) ...
  ).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8)))  ...
  + (-1.).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4)) ...
  ).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x( ...
  4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)) ...
  .*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos( ...
  x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + ( ...
  -1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4)) ...
  ).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))),cos( ...
  x(3)).*(0.0508.*cos(x(4)) + (-0.1524).*sin(x(4))) + (-1.).*sin(x( ...
  3)).*(0.1524.*cos(x(4)) + 0.0508.*sin(x(4))) + ((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))).*(0.4572.*(1. + (-1.).*cos(x(5)) ...
  ) + 0.1524.*sin(x(5))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*((-0.1524).*(1. + (-1.).*cos(x(5))) +  ...
  0.4572.*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*(0.8636.*(1. + (-1.).* ...
  cos(x(6))) + 0.1524.*sin(x(6))) + (cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*((-0.1524).*(1. + (-1.) ...
  .*cos(x(6))) + 0.8636.*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x( ...
  5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))).*sin(x(6))).*((-0.1524).*(1. + (-1.).*cos(x(7))) + ( ...
  -0.8636).*sin(x(7))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*(0.8636.*(1. + (-1.).*cos(x(7))) + (-0.1524).*sin(x( ...
  7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4) ...
  ) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x( ...
  3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) ...
   + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x( ...
  6))).*sin(x(7))).*((-0.1524).*(1. + (-1.).*cos(x(8))) + (-0.4572) ...
  .*sin(x(8))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x( ...
  3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))).*(0.4572.*(1. + (-1.).*cos(x(8))) + (-0.1524).* ...
  sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)) ...
  .*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).* ...
  cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4)) ...
  ).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*(0.0508.*(1. +  ...
  (-1.).*cos(x(9))) + (-0.1524).*sin(x(9))) + (cos(x(8)).*(cos(x(7)) ...
  .*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4))  ...
  + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin( ...
  x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7)))  ...
  + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)) ...
  .*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))).*((-0.1524).*(1. + (-1.).*cos(x(9))) + ( ...
  -0.0508).*sin(x(9))) + 0.0508.*(cos(x(9)).*(cos(x(8)).*(cos(x(7)) ...
  .*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4)) ...
  ).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x( ...
  3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos( ...
  x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ( ...
  -1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos( ...
  x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
   + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5)) ...
  ) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4) ...
  )) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x( ...
  4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).* ...
  sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3) ...
  ).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) ...
  .*sin(x(9))) + (-0.1524).*(cos(x(9)).*(cos(x(8)).*(cos(x(7)).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin( ...
  x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos( ...
  x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7)))  ...
  + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(3)).* ...
  cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)) ...
  .*cos(x(4)) + sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))) + (-1.).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
   + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) ...
   + (-1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) +  ...
  sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos( ...
  x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
   + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))).*sin(x(5)) ...
  ) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4) ...
  )) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6) ...
  ).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3) ...
  ).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(3)).*cos(x(4)) + sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + ((-1.).*cos(x(3)).*cos(x(4)) + sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) ...
  .*sin(x(9))),(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*(0.4572.*cos(x(5)) + (-0.1524).*sin(x(5))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*(0.1524.*cos(x(5)) +  ...
  0.4572.*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*(0.8636.*(1. + (-1.).* ...
  cos(x(6))) + 0.1524.*sin(x(6))) + (cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*((-0.1524).*(1.  ...
  + (-1.).*cos(x(6))) + 0.8636.*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*((-0.1524).*(1. + (-1.).* ...
  cos(x(7))) + (-0.8636).*sin(x(7))) + (cos(x(6)).*((-1.).*cos(x(5)) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*(0.8636.*(1. + (-1.).* ...
  cos(x(7))) + (-0.1524).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos( ...
  x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
   + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).* ...
  sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*((-0.1524).*(1. + (-1.).*cos(x(8))) + (-0.4572).*sin( ...
  x(8))) + (cos(x(7)).*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x( ...
  4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).* ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))).*(0.4572.*(1. + (-1.).*cos(x( ...
  8))) + (-0.1524).*sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)) ...
  .*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).* ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*((-1.).*cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) ...
  .*(0.0508.*(1. + (-1.).*cos(x(9))) + (-0.1524).*sin(x(9))) + (cos( ...
  x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4) ...
  ) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).*cos(x(5)).* ...
  (cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))) + (-1.).*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)) ...
  .*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).*cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*((-0.1524).*(1. + (-1.) ...
  .*cos(x(9))) + (-0.0508).*sin(x(9))) + 0.0508.*(cos(x(9)).*(cos(x( ...
  8)).*(cos(x(7)).*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x( ...
  4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).* ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos( ...
  x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
   + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).* ...
  sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*((-1.).*cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).* ...
  sin(x(9))) + (-0.1524).*(cos(x(9)).*(cos(x(8)).*(cos(x(7)).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.) ...
  .*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*((-1.).* ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.) ...
  .*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).* ...
  sin(x(8))) + (-1.).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*((-1.).* ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.) ...
  .*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + ((-1.).*cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) +  ...
  (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ...
   (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ((-1.).*cos(x(5)).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).* ...
  sin(x(6))) + (-1.).*(cos(x(6)).*((-1.).*cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (-1.).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))),(cos( ...
  x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + (( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x( ...
  5))).*(0.8636.*cos(x(6)) + (-0.1524).*sin(x(6))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*(0.1524.*cos(x(6)) + 0.8636.*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*((-0.1524).*(1. + (-1.).*cos( ...
  x(7))) + (-0.8636).*sin(x(7))) + ((-1.).*cos(x(6)).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*(0.8636.*(1. + (-1.).*cos(x(7) ...
  )) + (-0.1524).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*( ...
  (-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*((-1.).*cos(x(6)).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*((-0.1524).*(1.  ...
  + (-1.).*cos(x(8))) + (-0.4572).*sin(x(8))) + (cos(x(7)).*((-1.).* ...
  cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6) ...
  ).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*( ...
  0.4572.*(1. + (-1.).*cos(x(8))) + (-0.1524).*sin(x(8))) + (cos(x( ...
  8)).*(cos(x(7)).*((-1.).*cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x( ...
  4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))) + (-1.).*((-1.).*cos(x(6)).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  -1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*( ...
  0.0508.*(1. + (-1.).*cos(x(9))) + (-0.1524).*sin(x(9))) + (cos(x( ...
  8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))) + (-1.).*((-1.).*cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*((-1.).*cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*(( ...
  -0.1524).*(1. + (-1.).*cos(x(9))) + (-0.0508).*sin(x(9))) +  ...
  0.0508.*(cos(x(9)).*(cos(x(8)).*(cos(x(7)).*((-1.).*cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(( ...
  -1.).*cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin( ...
  x(7))).*sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5) ...
  ).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*((-1.).*cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*( ...
  cos(x(7)).*((-1.).*cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))) + (-0.1524).*(cos(x(9)) ...
  .*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))) + (-1.).*((-1.).*cos(x(6)).*(cos(x(5)).*(cos(x( ...
  3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*((-1.).* ...
  cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6) ...
  ).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin( ...
  x(8))) + (-1.).*(cos(x(8)).*(cos(x(7)).*((-1.).*cos(x(6)).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6) ...
  ).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*((-1.).* ...
  cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) ...
  .*sin(x(8))).*sin(x(9))),(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).* ...
  sin(x(6))).*((-0.8636).*cos(x(7)) + (-0.1524).*sin(x(7))) + (cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*((-0.1524).* ...
  cos(x(7)) + 0.8636.*sin(x(7))) + ((-1.).*cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*((-0.1524).*(1.  ...
  + (-1.).*cos(x(8))) + (-0.4572).*sin(x(8))) + (cos(x(7)).*(cos(x( ...
  6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x( ...
  4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*(0.4572.*( ...
  1. + (-1.).*cos(x(8))) + (-0.1524).*sin(x(8))) + (cos(x(8)).*(cos( ...
  x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) ...
   + ((-1.).*cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4) ...
  ) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) +  ...
  (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))).*sin(x(8))).*(0.0508.*(1. + (-1.).*cos(x(9))) + ...
   (-0.1524).*sin(x(9))) + (cos(x(8)).*((-1.).*cos(x(7)).*(cos(x(6)) ...
  .*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6) ...
  ).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4)) ...
  ) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*( ...
  cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ( ...
  -1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))).*((-0.1524).*(1. + (-1.).*cos(x(9))) + ( ...
  -0.0508).*sin(x(9))) + 0.0508.*(cos(x(9)).*(cos(x(8)).*(cos(x(7)) ...
  .*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos( ...
  x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) +  ...
  ((-1.).*cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4) ...
  ) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).* ...
  (cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).* ...
  sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ).*sin(x(7))).*sin(x(8))) + (cos(x(8)).*((-1.).*cos(x(7)).*(cos(x( ...
  6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6) ...
  ).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4)) ...
  ) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*( ...
  cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ( ...
  -1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))).*sin(x(9))) + (-0.1524).*(cos(x(9)).*(cos( ...
  x(8)).*((-1.).*cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) + (-1.).*( ...
  cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))) + ((-1.).*cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))),(cos( ...
  x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) ...
  .*((-0.4572).*cos(x(8)) + (-0.1524).*sin(x(8))) + (cos(x(7)).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6) ...
  ).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4)) ...
  ) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).* ...
  sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*((-0.1524) ...
  .*cos(x(8)) + 0.4572.*sin(x(8))) + (cos(x(8)).*(cos(x(7)).*(cos(x( ...
  6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x( ...
  4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*( ...
  cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) +  ...
  (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).* ...
  sin(x(8))).*(0.0508.*(1. + (-1.).*cos(x(9))) + (-0.1524).*sin(x(9) ...
  )) + ((-1.).*cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) +  ...
  (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4) ...
  )).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5)))  ...
  + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*((-0.1524) ...
  .*(1. + (-1.).*cos(x(9))) + (-0.0508).*sin(x(9))) + 0.0508.*(cos( ...
  x(9)).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).* ...
  sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) +  ...
  (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4) ...
  )).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) + ((-1.).*cos( ...
  x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4) ...
  ) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).* ...
  (cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).* ...
  sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.) ...
  .*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)) ...
  .*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))) + (-0.1524) ...
  .*(cos(x(9)).*((-1.).*cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5) ...
  ).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).* ...
  sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) + ( ...
  -1.).*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*sin(x(9))),(cos( ...
  x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ...
   (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) +  ...
  (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) +  ...
  (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin( ...
  x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4) ...
  )).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))).*sin(x(8))).*((-0.0508).*cos(x(9)) + ( ...
  -0.1524).*sin(x(9))) + (cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + ( ...
  cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x( ...
  4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) ...
  .*sin(x(5))).*sin(x(6))).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x( ...
  3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x( ...
  5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ...
   (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin( ...
  x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))).*sin(x(8))).*(( ...
  -0.1524).*cos(x(9)) + 0.0508.*sin(x(9))) + 0.0508.*(cos(x(9)).*( ...
  cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).* ...
  cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x( ...
  3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4))  ...
  + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*( ...
  cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin( ...
  x(6))).*sin(x(7))) + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
   + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).* ...
  sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin( ...
  x(4))).*sin(x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)) ...
  .*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + ( ...
  -1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x( ...
  5))).*sin(x(6))).*sin(x(7))).*sin(x(8))) + (-1.).*(cos(x(8)).*( ...
  cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) +  ...
  (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos( ...
  x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) + ...
   (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.) ...
  .*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).* ...
  cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)) ...
  .*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + ...
   (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.) ...
  .*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))).*sin(x(9))) + (-0.1524).*((-1.).*cos(x(9)) ...
  .*(cos(x(8)).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*( ...
  cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) +  ...
  ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin( ...
  x(5))).*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) ...
   + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + ( ...
  -1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos( ...
  x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3) ...
  ).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6)) ...
  ).*sin(x(7))) + (cos(x(7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin( ...
  x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*(( ...
  -1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.) ...
  .*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (-1.).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))).*sin(x(7))).*sin(x(8))) + (-1.).*(cos(x(8)).*(cos(x( ...
  7)).*(cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x( ...
  3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)) ...
  .*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3) ...
  ) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) +  ...
  (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))) + (-1.).*( ...
  cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).*sin(x(3)) + (-1.).*cos( ...
  x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3) ...
  ).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x(5)).*(cos(x(3)).*cos(x( ...
  4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3))  ...
  + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).*sin(x(7))) ...
   + (-1.).*(cos(x(7)).*(cos(x(6)).*(cos(x(5)).*((-1.).*cos(x(4)).* ...
  sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).*cos( ...
  x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))) + (-1.).*(cos(x( ...
  5)).*(cos(x(3)).*cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))) + ((-1.) ...
  .*cos(x(4)).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))).*sin(x(5))) ...
  .*sin(x(6))) + (cos(x(6)).*(cos(x(5)).*(cos(x(3)).*cos(x(4)) + ( ...
  -1.).*sin(x(3)).*sin(x(4))) + ((-1.).*cos(x(4)).*sin(x(3)) + (-1.) ...
  .*cos(x(3)).*sin(x(4))).*sin(x(5))) + (cos(x(5)).*((-1.).*cos(x(4) ...
  ).*sin(x(3)) + (-1.).*cos(x(3)).*sin(x(4))) + (-1.).*(cos(x(3)).* ...
  cos(x(4)) + (-1.).*sin(x(3)).*sin(x(4))).*sin(x(5))).*sin(x(6))).* ...
  sin(x(7))).*sin(x(8))).*sin(x(9))),0.,0.,0.,0.,0.,0.,0.,0.,0.];
